#include <iostream>
using namespace std;
#include <vector>
#include <string>


int main() {
    string str;
    getline(cin, str);
    int n = str.size();
    vector<string> ret;
    int sum = 0;
    int left = 0;
    int right = 0;
    for (int i = 0; i <= n; i++)
    {
        if (str[i] == ' ' || str[i] == 0)
        {
            string si;
            while (left != right)
            {
                si += str[left];
                left++;
            }
            if (si.size() != 0)
            {
                sum++;
                ret.push_back(si);
            }
            left++;
        }
        right++;
    }
    cout << sum << endl;
    n = ret.size();
    for (auto s : ret)
    {
        cout << s << endl;
    }
}

int main() {
    int N;
    int M;
    cin >> N >> M;
    int r = 0;
    while (N < M)
    {
        int i;
        int n = N / 2;
        for (i = n; i > 1; i--)
        {
            if (N % i == 0)
            {
                break;
            }
        }
        N += i;
        r++;
    }
    cout << r << endl;
    return 0;
}